package com.huirui.server.pojo.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalTime;

/**
 * 秒杀活动时间信息DTO
 * 用于接收或返回秒杀活动的时段配置（开始时间、结束时间）
 */
@Data
@Schema(
        name = "SeckillActivityDto",
        description = "秒杀活动时段信息数据传输对象，包含活动的开始时间和结束时间",
        example = "{\"startTime\": \"10:00:00\", \"endTime\": \"12:00:00\"}"
)
public class SeckillActivityVo {


    @Schema(description = "秒杀活动ID")
    private Long activityId;

    @Schema(description = "秒杀活动名字")
    private String activityName;

    @Schema(description = "秒杀活动状态")
    private Integer status;

    @Schema(
            description = "活动开始时间（24小时制，格式：HH:mm:ss）",
            requiredMode = Schema.RequiredMode.REQUIRED,
            example = "10:00:00",
            pattern = "HH:mm:ss",
            type = "string"
    )
    @JsonFormat(pattern = "HH:mm", shape = JsonFormat.Shape.STRING)
    private LocalTime startTime;

    @Schema(
            description = "活动结束时间（24小时制，格式：HH:mm:ss，需晚于开始时间）",
            requiredMode = Schema.RequiredMode.REQUIRED,
            example = "12:00:00",
            pattern = "HH:mm:ss",
            type = "string"
    )
    @JsonFormat(pattern = "HH:mm", shape = JsonFormat.Shape.STRING)
    private LocalTime endTime;
}